home *** CD-ROM | disk | FTP | other *** search
/ Softwarová Záchrana 3 / Softwarova-zachrana-3.bin / Xteq X-Setup / xqdcXSP-Setup-EN.exe / {app} / plugins / XQ Win9x Cache Write Delay.xpl < prev    next >
Text File  |  2002-02-24  |  2KB  |  50 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 6.0"
  2. "TYPE"="2"
  3. "COUNT"="1"
  4. "UIPATH 1"="Startup/Shutdown\Shutdown\Windows 9x/ME\20) Shutdown Options"
  5. "NAME"="Windows 9x/ME Cache Write Delay"
  6. "VERSION"="1.04"
  7. "OSVERSION"="00101"
  8. "LANGUAGE"="VBScript"
  9. "TEXT 1"="Delay (ms)"
  10. "DESCRIPTION 1"="By default, Windows uses an internal cache to speed up writing to the hard disk. This means, there is always a little delay between the writing in the internal Windows cache and the "real" write on the disk."
  11. "DESCRIPTION 2"="On some computers, this behavior might cause data loss on shutdown so you can increase the write cache time here. For example, to delay shutdown for 2 seconds, input a value of 2000."
  12. "DESCRIPTION 3"="To restore the original settings, clear the field."
  13. "AUTHOR"="Xteq Systems"
  14. "CONTACTURL"="http://www.xteq.com"
  15. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
  16. "COMMENT 1"="see Q273017"
  17. "COMMENT 2"="Thanks to Perez, Anthony <rivernet@digitalme.com> for the typo fix."
  18.  
  19.  
  20. sP="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\CacheWriteDelay"
  21. Sub Plugin_Initialize 
  22.     i=RegReadValue(sP)
  23.     SetUIElement 1,i
  24. End Sub
  25.  
  26. Sub Plugin_CheckData(ElementIndex)
  27. End Sub
  28.  
  29. Sub Plugin_Apply(ElementIndex,ElementSubIndex)
  30.  i=GetUIElement(1)
  31.  
  32.  if i="" then
  33.     'Delete Value   
  34.  
  35.     If RegValueExists(sP) then
  36.        Call RegDeleteValue(sP)
  37.     end if
  38.  
  39.  else
  40.     'Set Value
  41.     Call RegWriteValue(sP,i,2)
  42.     Call Restart
  43.  end if
  44.   
  45.  
  46. End Sub
  47.  
  48. Sub Plugin_Terminate 
  49. End Sub
  50.